<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">

<head>
<title>登录</title>
<base href="<%=basePath%>">
<link href="<c:url value="/styles/login.css"/>" type="text/css"
	rel="stylesheet">
<link href="<c:url value="/styles/style.css"/>" type="text/css"
	rel="stylesheet">
<link
	href="<c:url value="/scripts/jquery-easyui-1.3.2/themes/default/easyui.css"/>"
	type="text/css" rel="stylesheet">
<link
	href="<c:url value="/scripts/jquery-easyui-1.3.2/themes/icon.css"/>"
	type="text/css" rel="stylesheet">
<script src="<c:url value="/scripts/jquery-1.11.3.js"/>"
	type="text/javascript"></script>
<script
	src="<c:url value="/scripts/jquery-easyui-1.3.2/jquery.easyui.min.js"/>"
	type="text/javascript"></script>

<script type="text/javascript">
	function subdata() {
		if (!$("#signupForm").form('validate')) {
			return false;
		} else {
			$("#signupForm").submit();
		}
	}

	function submitForm() {
		$('#signupForm').form('submit');
	}
	function clearForm() {
		$('#signupForm').form('clear');
	}
	$(document).ready(
			function() {
				$('#Image').click(
						function() {
							$(this).attr(
									'src',
									'${ctx}/image.jpg?'+ Math.floor(Math.random() * 100));
						});
				$("#code").keydown(function(e) {
					if (e.which == 13) {
						$("#submitButton").click();
						return false;
					}
				});

			});
</script>
</head>

<body id="login">
	<div class="container">
		<div class="row">
			<form id="signupForm" method="post" action="${ctx}/home/logindo.do">
				<p class="block pretitle">
				<%-- <img class="title" src="${ctx}/images/hiseas3.png" border="0" /> --%>
					</p>
				<div class="col pre padding_top_60">
					<div class="widget clearfix">
						<img src="${ctx}/images/test1.png" class="pic">
						<h2>Login</h2>
						<span class="right" id="sysTip"
							style="font-size: 12px; color: red; margin-right: 20px;"></span>
						<div class="widget_inside">
							<div align="center">
								<c:if test="${msg!=null }">
									<span style="color: red"> ${msg} </span>
								</c:if>
							</div>
							<div class="form">
								<div class="clearfix">

									<label for="loginId">用户名 </label>
									<div class="input">
										<input type="text" name="loginName" id="loginName" value="wenjie"
											class="easyui-validatebox large txt"
											data-options="missingMessage:'Enter User Name.',required:true,validType:'length[3,20]'" />
									</div>

								</div>
								<div class="clearfix">
									<label for="password">密　码</label>
									<div class="input">
										<input type="password" name="pwd" id="pwd" value="123"
											class="easyui-validatebox large txt"
											data-options="prompt:'Enter User Password',required:true,validType:'length[3,20]'" />
									</div>
								</div>
								<div class="clearfix">
									<label for="password">验证码</label>
									<div class="input">
										<input type="text" name="code" id="code" value="123"
											class="easyui-validatebox large txt"
											data-options="missingMessage:'Enter Verification code',prompt:'Enter Verification code',required:true"
											autocomplete="off" />
									</div>
								</div>
								<div class="clearfix">
 									<div class="input no-label">
										&nbsp;&nbsp;　
									</div>
									&nbsp;<img id="Image" src="${ctx }/image.jpg"
										alt="Click to change the verification code"
										title="Click to change the verification code" /><span> ${ms}</span>
								</div>
								<div class="clearfix grey-highlight">
									<div class="input no-label ">
										<input id="submitButton" name="submitButton"
											class="button blue" type="button" value="Login"
											onclick="subdata()" /> <input id="submitButton"
											name="submitButton" class="button" type="button"
											onclick="clearForm()" value="Reset" />
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>

			</form>
		</div>
	</div>
</body>
</html>
